package com.twu.biblioteca;

/**
 * Created with IntelliJ IDEA.
 * User: abishek1
 * Date: 13/8/13
 * Time: 7:11 PM
 * To change this template use File | Settings | File Templates.
 */
public class Movie implements ReserveableItem{
    String name;
    int year;
    String director;
    int rating;
    String reservedBy;
    boolean available;
    Movie(String name, int year, String director, int rating){
        this.name = new String(name);
        this.year = year;
        this.director = new String(director);
        this.rating = rating;
    }
    void displayMovie(){
        System.out.print(name + "\t\t" + year + "\t\t" + director + "\t\t");
        if(rating == 0)
            System.out.println("N/A");
        else
            System.out.println(rating);
    }
    public void reserve(String userID){
        reservedBy = new String(userID);
        available = true;
    }
}
